const Layout = () => import('@/layout/index.vue')

const constantRoutes = [
	{
		path: '/',
		component: Layout,
		redirect: '/setting/appConfig'
	}
]
// 主要用来生成菜单
export const asyncRoutes = [
	{
		path: '/setting',
		component: Layout,
		redirect: '/setting/appConfig',
		meta: { title: '设置', icon: 'setting' },
		children: [
			{
				path: 'appConfig',
				component: () => import('@/views/setting/app-config.vue'),
				name: 'AppConfig',
				meta: { title: 'app配置' }
			}
		]
	}
]

const routes = [...constantRoutes, ...asyncRoutes]

export default routes
